

import config from "@/config";
import http from "@/utils/request";
const sale= { 
    url: `${config.MOCK_URL}/echars/sale`,
    name: "销售单品",
    post: async function(params={}){
        return await http.post(this.url, params);
    }
}
const saleprice= { 
    url: `${config.MOCK_URL}/echars/saleprice`,
    name: "销售单品",
    post: async function(params={}){
        return await http.post(this.url, params);
    }
}
const tool= { 
    url: `${config.MOCK_URL}/baobiao/tool`,
    name: "销售报表",
    post: async function(params={}){
        return await http.post(this.url, params);
    }
}
const registerVip= { 
    url: `${config.MOCK_URL}/higuang/registerVip`,
    name: "注册会员",
    post: async function(params={}){
        return await http.post(this.url, params);
    }
}
const chadanpin= {
    url: `${config.MOCK_URL}/chakucun/chadanpin`,
    name: "库存查询",
    post: async function(params={}){
        return await http.post(this.url, params);
    }
}
const chazhengda= {
    url: '',
    name: "库存查询",
    get: async function(page,pagesize){
        return await http.get(`https://wqsou.jd.com/search/searchjson?datatype=1&page=${page}&pagesize=${pagesize}&merge_sku=no&qp_disable=yes&key=ids%2C%2C1000086171&source=omz&_fd=jdm&_=1631680912233&sceneval=2&g_login_type=1&callback=jsonpCBKK&g_ty=ls`);
    
    },
    from: async function(page,pagesize,config={}){
        return await http.from(`https://wqsou.jd.com/search/searchjson?datatype=1&page=${page}&pagesize=${pagesize}&merge_sku=no&qp_disable=yes&key=ids%2C%2C1000086171&source=omz&_fd=jdm&_=1631680912233&sceneval=2&g_login_type=1&callback=jsonpCBKK&g_ty=ls`,config);
    }
}
export {sale,saleprice,tool,registerVip,chadanpin,chazhengda}